package com.likl.controller;

import com.likl.domain.Book;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName:springboot_study
 * Description:
 *
 * @Create: 2024/7/5 16:27
 * @author: likl
 * @e-mail: likl1102@foxmail.com
 * @QQ: 2514927731
 */
@RestController
@RequestMapping("/books")
public class BookController {
//    @GetMapping
//    public String getById() {
//        System.out.println("run");
//        return "run";
//    }

    @GetMapping
    public Book getById() {
        Book book = new Book();
        book.setName("fuck");
        book.setId(1);
        book.setDescription("fuck you!");
        return book;
    }
}
